package top.fkxuexi.smartwork.MetaEntity;

public class ColMeta {

    // 列的java命名，主要是驼峰命名
    private String javaAttrName;
    // 列的数据库命名，主要是下划线的命名风格
    private String dbAttrName;
    // 列的java的数据类型
    private String javaAttrType;
    // 列的数据库的数据类型
    private String dbAttrType;
    // 默认值
    private String defaultValue;
    // 类的评论
    private String comment;

    // 是否为主键，这个便于在模板引擎中的判断，遍历属性的时候
    private boolean isKey;
    private boolean isAutoIncrease;

    public ColMeta(String javaAttrName, String dbAttrName, String dbAttrType,String javaAttrType,
                   String defaultValue, String comment, boolean isKey, boolean isAutoIncrease) {

        this.javaAttrName = javaAttrName;
        this.dbAttrName = dbAttrName;
        this.dbAttrType = dbAttrType;
        this.javaAttrType = javaAttrType;
        this.defaultValue = defaultValue;
        this.comment = comment;
        this.isKey = isKey;
        this.isAutoIncrease = isAutoIncrease;
    }

    public String getJavaAttrName() {
        return javaAttrName;
    }

    public void setJavaAttrName(String javaAttrName) {
        this.javaAttrName = javaAttrName;
    }

    public String getDbAttrName() {
        return dbAttrName;
    }

    public void setDbAttrName(String dbAttrName) {
        this.dbAttrName = dbAttrName;
    }

    public String getJavaAttrType() {
        return javaAttrType;
    }

    public void setJavaAttrType(String javaAttrType) {
        this.javaAttrType = javaAttrType;
    }

    public String getDbAttrType() {
        return dbAttrType;
    }

    public void setDbAttrType(String dbAttrType) {
        this.dbAttrType = dbAttrType;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public boolean isKey() {
        return isKey;
    }

    public void setKey(boolean key) {
        isKey = key;
    }

    public boolean isAutoIncrease() {
        return isAutoIncrease;
    }

    public void setAutoIncrease(boolean autoIncrease) {
        isAutoIncrease = autoIncrease;
    }
}
